home *** CD-ROM | disk | FTP | other *** search
- TABLE OF CONTENTS
-
- amigametaformat.library/--background--
- amigametaformat.library/AmfOpen
- amigametaformat.library/AmfFunction
- amigametaformat.library/AmfClose
- amigametaformat.library/--background-- amigametaformat.library/--background--
-
- PURPOSE
- The amigametaformat.library let you draw in a virtual space AND
- map this TO any outputdevice, like window, rastport, metafile etc.
-
- amigametaformat.library/AmfOpen amigametaformat.library/AmfOpen
-
- NAME
- AmfOpen - create a amf structure
-
- SYNOPSIS
- amf = AmfOpen(channel,dataArray);
- D0 A0 D0
-
- APTR *AmfOpen(ULONG, ULONG**);
-
- FUNCTION
- This routine allocs memory for the amf structure.
- This routine must be called as the first.
-
- INPUTS
- channel -- outputchannel
- ( 1-window, 3-IFF, 4-rastport, 5-EPS, 6-GEM, 7-CGM)
- dataArray -- array that include the datas for the channel
- ( CASE channel=window
- [Window struct window *,
- cm struct colormap *]
- CASE channel=IFF
- [iff struct IFFHandle *,
- xsize ULONG,
- ysize ULONG]
- CASE channel=rastport
- [RPort struct RastPort *,
- xstart ULONG,
- ystart ULONG,
- xsize ULONG,
- ysize ULONG]
- CASE channel=EPS
- [File filehandle *]
- CASE channel=GEM
- [File filehandle *]
- CASE channel=CGM
- [File filehandle *]
- )
-
- - The Window must be opened and the colormap must be valid, example
- screen.viewport.colormap.
- This channel let you draw to a window.
- - The IFFHandle must be initialized, filled with iff_Stream,
- and opened.
-
- if file=open(...)
- {
- if iff=allociff()
- {
- initiffasdos(iff);
- iff.stream=file;
- openiff(iff,ifff_write);
- if amf=amfopen(3,...)
- ...
- freeiff(iff)
- }
- close(file)
- }
-
- xsize and ysize the original size (p.e. 640x400)
- This channel let you save the draw within a IFF-structure. The
- structure have just 2 ID's:
- VERS: 2 ULONGs that store the Library-version with
- first ULONG: version (ex: 1)
- second ULONG revision (ex: 0)
- BODY: all functions (except Get... and SetDPI and SetFont to Font)
- are stored in this
- way:
- BEGIN
- function-number ULONG
- count ULONG
- first data from dataArray ULONG
- second data ULONG
- ....
- (count) data ULONG
- END
- repeated for every called function
- - The RastPort must have a valid bitmap-structure.
-
- RESULT
- amf -- an initialized amf structure, or NULL on failure
-
- NOTES
- The amf structure are private only!
-
- BUGS
- Some channels are still in progress.
-
- FUTURE
-
- amigametaformat.library/AmfFunction amigametaformat.library/AmfFunction
-
- NAME
- AmfFunction -- select a amf Function
-
- SYNOPSIS
- result = AmfFunction(amf,dataArray,function,count);
- D0 A1 A0 D1 D0
-
- ULONG *AmfFunction(APTR, ULONG**, ULONG, ULONG);
-
- FUNCTION
- Select a function from the amf functions and draw the result to
- the opened channel or get the result back.
-
- INPUTS
- amf -- amf struct ready opened with AmfOpen()
- dataArray -- array of ULONG with the needed datas
- function -- amf function defined in amigametafile.const
- count -- counter of ULONGs in dataArray
-
- RESULT
- NULL for all draw and set functions, if there was no error
- <>NULL for all draw and set functions, if not supported
- RESULT for all get functions
-
- NOTES
- Some functions on some channels are not supported.
-
- amigametaformat.library/AmfClose amigametaformat.library/AmfClose
-
- NAME
- AmfClose -- free amf struct
-
- SYNOPSIS
- AmfClose(amf);
- D0
-
- VOID AmfClose(APTR)
-
- FUNCTION
- Free all memory allocated for amf structure.
-
-